﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using PlutoStudio.Modules;
using PlutoStudio.AspNetCore;
using Microsoft.Extensions.Configuration;
using Microsoft.AspNetCore.Hosting;
using PlutoStudio.AspNetCore.Configuration;

namespace AspNetCoreExample
{
    [DependsOn(typeof(AspNetCoreModule))]

    public class MyProjectWebModule : Module
    {
        public override void PreInitialize()
        {
            //Configuration.DefaultNameOrConnectionString = _appConfiguration.GetConnectionString(MyProjectConsts.ConnectionStringName);

            //Configuration.Navigation.Providers.Add<MyProjectNavigationProvider>();

            //Configuration.Modules.AspNetCore();
        }

        public override void Initialize()
        {
            IocManager.RegisterAssemblyByConvention(typeof(MyProjectWebModule).Assembly);
            //Configuration.Auditing.IsEnabled = false;
            Configuration.Auditing.IsEnabledForAnonymousUsers = true;
            
        }
    }
}
